// COPYRIGHT © 2020 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute and use this code without modification,
// provided you adhere to the terms of the MLA and include this
// copyright notice.
//
// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
//
// For additional information, contact:
// Environmental Systems Research Institute, Inc.
// Attn: Contracts and Legal Services Department
// 380 New York Street
// Redlands, California, USA 92373
// USA
//
// email: contracts@esri.com
//
// See http://js.arcgis.com/3.34/esri/copyright.txt for details.

define(["./GridDataUtil","../../supportClasses/templateJsonUtils/fieldInfo/FieldInfoBuilder"],(function(e,t){return{syncParentFieldInfoWithElementState:function(i,o){if(i&&o){var n=e.getFieldInfo(i);n&&(n.isChart?(n.chartJson.visualProperties.width=i.getWidth(),n.chartJson.visualProperties.height=i.getHeight()):n.isMap?e.setFieldInfo(i,t.createFieldInfoFromMap(o.toJson())):n.isImage?e.setFieldInfo(i,t.createFieldInfoFromImage(o.toJson(),o.imageTriggerJson)):n.isShape?e.setFieldInfo(i,t.createFieldInfoFromShape(o.toJson())):n.isReportSection?e.setFieldInfo(i,t.createFieldInfoFromSection(o.toJson())):n.isInfographic&&e.setFieldInfo(i,t.createFieldInfoFromInfographic(o.toJson())))}}}}));